<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class GoEz_View</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class GoEz_View</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">View 類別</p>
	<ul class="tags">
				<li><span class="field">copyright:</span> Copyright (c) 2008-2012 Wabow Information Inc. (http://www.wabow.com)</li>
				<li><span class="field">license:</span> New</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_View.php.html">/View.php</a> (line <span class="field">18</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_config" title="details" class="var-name">$_config</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_frontendVars" title="details" class="var-name">$_frontendVars</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_vars" title="details" class="var-name">$_vars</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																												
												<div class="method-definition">
											<span class="method-result">GoEz_View</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#fetchJson" title="details" class="method-name">fetchJson</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#fetchTemplate" title="details" class="method-name">fetchTemplate</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../GoEz/GoEz_View_Engine.html">GoEz_View_Engine</a></span>
										<a href="#getViewEngine" title="details" class="method-name">getViewEngine</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#renderJson" title="details" class="method-name">renderJson</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#renderTemplate" title="details" class="method-name">renderTemplate</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setFrontendVars" title="details" class="method-name">setFrontendVars</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_setVars" title="details" class="method-name">_setVars</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$vars</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$vars</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__set" title="details" class="method-name">__set</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>])
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$_config" id="$_config"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_config</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">25</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">設定</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_frontendVars" id="$_frontendVars"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_frontendVars</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">71</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">HTML 前端樣版變數</p>
<p class="description"><p>主要會在呼叫 renderTemplate() 方法時，將這裡的變數傳送給 GoEz_View_Engine 應用</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_vars" id="$_vars"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_vars</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">42</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">樣版變數</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">32</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">初始化</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">GoEz_View</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$config</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfetchJson" id="fetchJson"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">fetchJson</span> (line <span class="line-number">179</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">產生 JSON</p>
<p class="description"><p>注意：這個方法不會把 frontendVars 的內容包含進來</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			fetchJson
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodfetchTemplate" id="fetchTemplate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">fetchTemplate</span> (line <span class="line-number">151</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得 Render 結果</p>
<p class="description"><p>先將一般的樣版變數以及 frontendVars 指定的樣版變數 assign 給 GoEz_View_Engine  然後回傳 GoEz_View_Engine::fetch() 後的結果</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			fetchTemplate
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetViewEngine" id="getViewEngine"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getViewEngine</span> (line <span class="line-number">127</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得 View Engine</p>
<p class="description"><p>這裡會自動抓取 INI 檔案裡設定的 view config  然後設定 GoEz_View_Engine 的初始值，然後回傳</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../GoEz/GoEz_View_Engine.html">GoEz_View_Engine</a></span>
		<span class="method-name">
			getViewEngine
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodrenderJson" id="renderJson"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">renderJson</span> (line <span class="line-number">189</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">顯示 JSON</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			renderJson
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodrenderTemplate" id="renderTemplate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">renderTemplate</span> (line <span class="line-number">167</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">輸出 Render 結果</p>
<p class="description"><p>直接顯示 fetchTemplate() 方法回傳的結果</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			renderTemplate
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetFrontendVars" id="setFrontendVars"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setFrontendVars</span> (line <span class="line-number">81</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">設定前端樣版變數</p>
<p class="description"><p>用來指定 GoEz_View_Engine 專用的前端樣版變數</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setFrontendVars
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
<a name="method_setVars" id="_setVars"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_setVars</span> (line <span class="line-number">93</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">設定變數</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_setVars
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$vars</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$vars</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$vars</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$vars</span>			</li>
				</ul>
		
			
	</div>
<a name="method__set" id="__set"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__set</span> (line <span class="line-number">59</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">設定樣版變數</p>
<p class="description"><p>透過魔術方法 __set() ，我們可以用以下的方式來設定樣版變數：</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$view</span><span class="src-sym">-&gt;</span><span class="src-id">abc&nbsp;</span>=&nbsp;<span class="src-num">123</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$view</span><span class="src-sym">-&gt;</span><span class="src-id">def&nbsp;</span>=&nbsp;<span class="src-num">456</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>然後在呼叫 renderTemplate() 方法時，就會自動把這些變數指定給 GoEz_View_Engine</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__set
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 04 Jan 2010 10:48:56 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>